Skip to content

Review follow-ups: fail loudly on bad config, --json on usage errors, doctor hints - #50

Merged
niklashoelter merged 3 commits into
masterfrom
fix/review-followups
Oct 28, 2026
Merged

niklashoelter merged 3 commits into
masterfrom
fix/review-followups

Conversation

@niklashoelter

Copy link
Copy Markdown
Owner

Follow-ups from the review after #49. No version bump yet.

Fail loudly instead of falling back

  • Config paths. load_config_from_file(path) raises when an explicit path doesn't exist. Before, it silently used the defaults, so the example scripts ran their ORB sections with UMA when started outside examples/. Called with no path, it still reads ./config.json if present and uses the defaults otherwise. The examples now resolve their configs and inputs from their own directory.
  • Autobatcher bounds. memory_scaling_factor must be greater than 1, because otherwise the probe never grows. max_memory_padding must lie between 0.05 and 0.95. Both bounds are in the JSON Schema too.
  • SevenNet D3.
    • Damping other than BJ is rejected; it used to be silently ignored.
    • D3 on an omol25_* modal logs the same double-counting warning as the other ωB97M-V models.
  • Fairchem models need the omol task.
    • The CLI accepts gpuma's UMA list plus fairchem's *-omol models. r2scan, OC25 and ODAC25 are rejected.
    • The loaders check that the model has an omol task, which also covers model_path checkpoints.
  • config --create writes the built-in defaults. It used to write the loaded ./config.json together with the CLI overrides. It now refuses to overwrite an existing file.

--json

  • Argparse usage errors (exit 2) now print a summary too, with error.type UsageError, so --json always gives exactly one JSON object.
  • The docs list checks, recommended_device, schema and installed.

doctor

  • On an old driver with a CUDA 13 torch build, the reinstall hint adds --force-reinstall (pip) or --reinstall-package torch (uv). Without it, installing the same version is a no-op.
  • For CUDA 12 builds, the hint says to update the driver.

Docs and housekeeping

  • uv.lock is tracked, so uv sync --frozen reproduces the tested environment.
  • docs/agents.md installs the tool with the cu126 index. This was tested on driver 535 and gives torch 2.13.0+cu126 with CUDA.
  • Other docs fixes:
    • --model-type alone doesn't pick an ORB model name.
    • the --multiplicity help text.
    • the "Edit this page" link now points at master.
    • --python 3.12 in index.md.
    • the device default.
    • Morfeus wording.

Testing

  • Full suite: 694 passed, 1 skipped.
  • mkdocs build --strict passes.
  • A single-atom input (Na⁺) on uma-s-1p2p1-ft-d4rev works in both paths, with matching energies.

Runtime dependencies are pinned exactly, but transitive ones are not; the lock
makes uv sync --frozen reproduce the tested environment.
Reinstalling the same torch version from the cu126 index needs
--force-reinstall (pip) or --reinstall-package (uv). For CUDA 12 builds the
only fix is a newer driver, since gpuma pins torch.
- Explicit config paths must exist; examples resolve paths from their own
  directory.
- memory_scaling_factor must be > 1 and max_memory_padding within
  [0.05, 0.95].
- SevenNet D3 rejects non-BJ damping and warns for omol25_* modals.
- Only fairchem models with the omol task are accepted.
- config --create writes the defaults and refuses to overwrite.
- --json prints a summary for argparse usage errors too.
- Docs: --json keys, uv tool install with the cu126 index, --model-type,
  edit link, and smaller fixes.
@niklashoelter
niklashoelter merged commit 4728b8b into master Oct 28, 2026
1 check passed
@niklashoelter
niklashoelter deleted the fix/review-followups branch October 28, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant